cmake_minimum_required(VERSION 3.10)

#增加glm
SET(GLM_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp/3rdparty/libglm)
INCLUDE_DIRECTORIES(${GLM_DIR}/include)

#增加stbimage
SET(STBIMAGE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp/3rdparty/libstbimage)
INCLUDE_DIRECTORIES(${STBIMAGE_DIR}/include)

#设置自己写的文件路径
SET(CPPDIR ${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp)

SET(LIB_SRC ${CPPDIR}/CCOpenGLRender.cpp
        ${CPPDIR}/CCRender.cpp
        ${CPPDIR}/CCTexture.cpp
        ${CPPDIR}/CCOpenGLShader.cpp
        )

add_library(CCOpenGLRender SHARED ${LIB_SRC})

target_link_libraries(
        CCOpenGLRender
#        -lGLESv1_CM #OpenGL V1
#        -lGLESv2 #OpenGL V2
        -lGLESv3
        -landroid
        log
)